﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Routing;
using Microsoft.Practices.Unity;

namespace Vit.Web.Models
{
    public class WebSite
    {
        public WebSite()
        {
        }

        public string Name { get; set; }
        public string DisplayName { get; set; }
        public string Description { get; set; }
        public string PageTitleSeparator { get; set; }
        public string FavIconUrl { get; set; }
        public string DefaultGravatar { get; set; }
        public Theme DefaultTheme { get; set; }
        public Locale DefaultLocale { get; set; }

        public string RootPath { get; set; }
        public string PhysicalRootPath
        {
            get { return HttpContext.Current.Server.MapPath(RootPath); }
        }
        public string UserFilesPath { get; set; }

        public IEnumerable<Theme> Themes { get; set; }
        public IEnumerable<MappingDomain> MappingDomains { get; set; }
        public IEnumerable<Locale> SupportLocales { get; set; }
        public IEnumerable<WebPage> Pages { get; set; }
        public IEnumerable<Menu> Menu { get; set; }

        public RouteData RouteData { get; set; }

        public WebPage HomePage { get; set; }
        public WebPage MissingPage { get; set; }
        public WebPage DialogPage { get; set; }

        public WebPage CurrentPage
        {
            get { return HttpContext.Current.Items["page"] as WebPage; }
        }
    }
}
